﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class MyText<T>
    {
        static void Main(string[] args)
        {
           
            /* SortedList sortedlist = new SortedList();
             sortedlist.Add(0,"火腿肠");
             sortedlist.Add(1, "火腿");
             sortedlist.Add(2, "奶酪");
             sortedlist.Add(3, "果汁");
             sortedlist.Add(4, "蓝莓");

             Console.WriteLine("你想吃个啥");
             int id = int.Parse(Console.ReadLine());
             bool falg = sortedlist.ContainsKey(id);
             if (falg)
             {

                 Console.WriteLine("没事了，马上来");

             }
             else {
                 Console.WriteLine("你说的是什么鬼");
             }
             foreach (DictionaryEntry gt in sortedlist) {
                 int key = (int)gt.Key;
                 string konw = gt.Value.ToString();
                 Console.WriteLine("这个东西{0}{1}来了",key,konw);
             }
             
             */




            //泛式

        /*    //将T设置为double类型
            Add<double>(3.3, 4);
            //将T设置为int类型
            Add<int>(3, 4);*/

            MyTest<int> tset = new MyTest<int>();
            tset.Add(32);
            tset.Add(27);
            tset.Add(13);
            tset.Show();
         
           
        }
        /*//加法运算
        private static void Add<T>(T a, T b)
        {
            double sum = double.Parse(a.ToString()) + double.Parse(b.ToString());

            Console.WriteLine(sum);
        }
        */



    }
   

    class print {

        static void Main(string[] args)
        {
           
            

        }
        }
    
}